<html>
<head>
  <title>性能优化(9)-多线程并发优化</title>
  <basefont face="微软雅黑" size="2" />
  <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
  <meta name="exporter-version" content="YXBJ Windows/601935 (zh-CN, DDL); Windows/10.0.0 (Win64); EDAMVersion=V2;"/>
  <style>
    body, td {
      font-family: 微软雅黑;
      font-size: 10pt;
    }
  </style>
</head>
<body>
<a name="774"/>
<h1>性能优化(9)-多线程并发优化</h1>

<div>
<span><div><br/></div><div style="font-size: 16px; min-width: 100%; position: relative;"><div style="box-sizing: border-box; text-size-adjust: 100%; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);"><div style="box-sizing: border-box; font-size: 14px; background-color: rgb(255, 255, 255);"><div style="box-sizing:border-box;"><div style="box-sizing:border-box;background-color:rgb(249, 249, 249);"><div style="box-sizing:content-box;justify-content:center;font-size:16px;"><div style="box-sizing:border-box;"><div style="box-sizing:border-box;background-color:rgb(255, 255, 255);border-radius:4px;"><h1 style="box-sizing: border-box; margin-top: 0px; margin-bottom: 0.5em; text-rendering: optimizeLegibility; font-size: 30px; word-break: break-word;"><span style="font-size: 23pt;"><span style="font-size: 23pt; color: rgb(64, 64, 64); font-weight: bold;">性能优化(9)-多线程并发优化</span></span><span style="font-size: 30px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;"> </span></h1><div><span style="font-size: 18px; color: rgb(0, 0, 0); font-family: 宋体; font-weight: bold; line-height: 1.8;">本篇文章是码牛学院经网上整理收集给大家的性能优化全集，希望能帮助到各位同学</span></div><div style="box-sizing: border-box; margin-bottom: 20px;"><h2 style="box-sizing: border-box; margin-top: 0px; text-rendering: optimizeLegibility; margin-bottom: 16px; font-size: 24px;"><span style="font-size: 24px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 600; line-height: 1.8;">介绍</span></h2><blockquote style="box-sizing: border-box; padding: 20px; background-color: rgb(250, 250, 250); border-left: 6px solid rgb(230, 230, 230); word-break: break-word; font-size: 16px; margin: 0px 0px 20px;"><div style="box-sizing: border-box; margin-top: 0px; word-break: break-word; margin-bottom: 0px;"><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: normal; line-height: 30px;">在程序开发的实践当中，为了让程序表现得更加流畅，我们肯定会需要使用到多线程来提升程序的并发执行性能。但是编写多线程并发的代码一直以来都是一个相对棘手的问题，所以想要获得更佳的程序性能，我们非常有必要掌握多线程并发编程的基础技能。</span></div></blockquote><h4 style="box-sizing: border-box; margin-top: 0px; text-rendering: optimizeLegibility; margin-bottom: 16px; font-size: 20px;"><span style="font-size: 20px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 600; line-height: 1.8;">一.Thread 使用</span></h4><blockquote style="box-sizing: border-box; padding: 20px; background-color: rgb(250, 250, 250); border-left: 6px solid rgb(230, 230, 230); word-break: break-word; font-size: 16px; margin: 0px 0px 20px;"><div style="box-sizing: border-box; margin-top: 0px; word-break: break-word; margin-bottom: 20px;"><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: normal; line-height: 30px;">在讲解多线程之前，我们先来讲解Thread使用几个需要注意的点：</span></div><h6 style="box-sizing: border-box; margin-top: 0px; text-rendering: optimizeLegibility; margin-bottom: 16px; font-size: 16px;"><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 600; line-height: 30px;">1.Thread 中断</span></h6><h6 style="box-sizing: border-box; margin-top: 0px; text-rendering: optimizeLegibility; margin-bottom: 16px; font-size: 16px;"><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 600; line-height: 30px;">常用的有两种方式：</span></h6><h6 style="box-sizing: border-box; margin-top: 0px; text-rendering: optimizeLegibility; font-size: 16px; margin-bottom: 0px;"><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 600; line-height: 30px;">(1).通过抛出InterruptedException来中断线程</span></h6></blockquote><div style="box-sizing:border-box;position:relative;overflow:hidden;"><div style="box-sizing: border-box; text-align: left; word-spacing: normal; tab-size: 4; hyphens: none; margin: 0px 0px 20px; overflow-y: auto; overflow-x: scroll; overscroll-behavior-x: contain; border-radius: 4px; z-index: 0; font-size: 12px; overflow-wrap: normal; word-break: break-all; white-space: pre; padding: 1em 1em 1em 3.8em; position: relative; background: rgb(45, 45, 45);"><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">public</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">static</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">class</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(248, 197, 85); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">MyThread</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">extends</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(248, 197, 85); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">Thread</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">{</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">private</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">int</span> <span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">count</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(103, 205, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">=</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">0</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">@Override</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">public</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">void</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">run</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">{</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">super</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">run</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">try</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">{</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">while</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">true</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">{</span></div><div><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">count</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(103, 205, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">++</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(248, 197, 85); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">System</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">out</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">println</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(126, 198, 153); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">&quot;count value:&quot;</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(103, 205, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">+</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">count</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">if</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">this</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">interrupted</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(103, 205, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">||</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">this</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">isInterrupted</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">{</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(248, 197, 85); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">System</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">out</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">println</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(126, 198, 153); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">&quot;check interrupted show!&quot;</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">throw</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">new</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(248, 197, 85); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">InterruptedException</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">}</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">}</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">}</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">catch</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(248, 197, 85); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">InterruptedException</span> <span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">e</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">{</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(248, 197, 85); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">System</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">out</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">println</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(126, 198, 153); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">&quot;thread is stop!&quot;</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span></div><div><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">e</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">printStackTrace</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">}</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">}</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">}</span></div></div></div><blockquote style="box-sizing: border-box; padding: 20px; background-color: rgb(250, 250, 250); border-left: 6px solid rgb(230, 230, 230); word-break: break-word; font-size: 16px; margin: 0px 0px 20px;"><h6 style="box-sizing: border-box; margin-top: 0px; text-rendering: optimizeLegibility; font-size: 16px; margin-bottom: 0px;"><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 600; line-height: 30px;">(2).通过变量来中断（常用）</span></h6></blockquote><div style="box-sizing:border-box;position:relative;overflow:hidden;"><div style="box-sizing: border-box; text-align: left; word-spacing: normal; tab-size: 4; hyphens: none; margin: 0px 0px 20px; overflow-y: auto; overflow-x: scroll; overscroll-behavior-x: contain; border-radius: 4px; z-index: 0; font-size: 12px; overflow-wrap: normal; word-break: break-all; white-space: pre; padding: 1em 1em 1em 3.8em; position: relative; background: rgb(45, 45, 45);"><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">public</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">static</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">class</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(248, 197, 85); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">CustomThread</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">extends</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(248, 197, 85); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">Thread</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">{</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">private</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">int</span> <span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">count</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(103, 205, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">=</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">0</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">private</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">boolean</span> <span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">isCancel</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(103, 205, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">=</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">false</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">@Override</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">public</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">void</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">run</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">{</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">super</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">run</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">while</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(103, 205, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">!</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">isCancel</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">{</span></div><div><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">count</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(103, 205, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">++</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(248, 197, 85); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">System</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">out</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">println</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(126, 198, 153); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">&quot;count value:&quot;</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(103, 205, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">+</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">count</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">}</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">}</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">public</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">synchronized</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">void</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">cancel</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">{</span></div><div><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">isCancel</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(103, 205, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">=</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">true</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">}</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">}</span></div></div></div><blockquote style="box-sizing: border-box; padding: 20px; background-color: rgb(250, 250, 250); border-left: 6px solid rgb(230, 230, 230); word-break: break-word; font-size: 16px; margin: 0px 0px 20px;"><h6 style="box-sizing: border-box; margin-top: 0px; text-rendering: optimizeLegibility; margin-bottom: 16px; font-size: 16px;"><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 600; line-height: 30px;">2.同步</span></h6><div style="box-sizing: border-box; margin-top: 0px; word-break: break-word; margin-bottom: 20px;"><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: normal; line-height: 30px;">我们分变量同步和代码块同步两个方面来讲解</span></div><h6 style="box-sizing: border-box; margin-top: 0px; text-rendering: optimizeLegibility; margin-bottom: 16px; font-size: 16px;"><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 600; line-height: 30px;">(1).变量同步</span></h6><h6 style="box-sizing: border-box; margin-top: 0px; text-rendering: optimizeLegibility; font-size: 16px; margin-bottom: 0px;"><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 600; line-height: 30px;">使用volatile关键字</span></h6></blockquote><div style="box-sizing:border-box;position:relative;overflow:hidden;"><div style="box-sizing: border-box; text-align: left; word-spacing: normal; tab-size: 4; hyphens: none; margin: 0px 0px 20px; overflow-y: auto; overflow-x: scroll; overscroll-behavior-x: contain; border-radius: 4px; z-index: 0; font-size: 12px; overflow-wrap: normal; word-break: break-all; white-space: pre; padding: 1em 1em 1em 3.8em; position: relative; background: rgb(45, 45, 45);"><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(153, 153, 153); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">/**</span></div><div><code style="box-sizing: border-box; border: none; background: none transparent; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; font-size: 1em; padding: 0px; vertical-align: unset; position: relative; white-space: inherit;"><span style="box-sizing: border-box; background-color: transparent; color: rgb(153, 153, 153); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">* 主内存和线程内存缓存进行同步</span></code></div><div><code style="box-sizing: border-box; border: none; background: none transparent; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; font-size: 1em; padding: 0px; vertical-align: unset; position: relative; white-space: inherit;"><span style="box-sizing: border-box; background-color: transparent; color: rgb(153, 153, 153); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">*/</span></code></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">volatile</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">int</span> <span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">val</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(103, 205, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">=</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">5</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">public</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">int</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">getVal</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">{</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">return</span> <span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">val</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">}</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">public</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">void</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">setVal</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">int</span> <span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">val</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">{</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">this</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">val</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(103, 205, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">=</span> <span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">val</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">}</span></div></div></div><blockquote style="box-sizing: border-box; padding: 20px; background-color: rgb(250, 250, 250); border-left: 6px solid rgb(230, 230, 230); word-break: break-word; font-size: 16px; margin: 0px 0px 20px;"><h6 style="box-sizing: border-box; margin-top: 0px; text-rendering: optimizeLegibility; font-size: 16px; margin-bottom: 0px;"><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 600; line-height: 30px;">使用synchronized关键字</span></h6></blockquote><div style="box-sizing:border-box;position:relative;overflow:hidden;"><div style="box-sizing: border-box; text-align: left; word-spacing: normal; tab-size: 4; hyphens: none; margin: 0px 0px 20px; overflow-y: auto; overflow-x: scroll; overscroll-behavior-x: contain; border-radius: 4px; z-index: 0; font-size: 12px; overflow-wrap: normal; word-break: break-all; white-space: pre; padding: 1em 1em 1em 3.8em; position: relative; background: rgb(45, 45, 45);"><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">int</span> <span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">val2</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(103, 205, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">=</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">5</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(153, 153, 153); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">/**</span></div><div><code style="box-sizing: border-box; border: none; background: none transparent; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; font-size: 1em; padding: 0px; vertical-align: unset; position: relative; white-space: inherit;"><span style="box-sizing: border-box; background-color: transparent; color: rgb(153, 153, 153); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">* 使用一个motinor来监听（实现资源由一个线程进行操作）</span></code></div><div><code style="box-sizing: border-box; border: none; background: none transparent; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; font-size: 1em; padding: 0px; vertical-align: unset; position: relative; white-space: inherit;"><span style="box-sizing: border-box; background-color: transparent; color: rgb(153, 153, 153); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">* 主内存和线程内存缓存进行同步</span></code></div><div><code style="box-sizing: border-box; border: none; background: none transparent; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; font-size: 1em; padding: 0px; vertical-align: unset; position: relative; white-space: inherit;"><span style="box-sizing: border-box; background-color: transparent; color: rgb(153, 153, 153); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">* @return</span></code></div><div><code style="box-sizing: border-box; border: none; background: none transparent; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; font-size: 1em; padding: 0px; vertical-align: unset; position: relative; white-space: inherit;"><span style="box-sizing: border-box; background-color: transparent; color: rgb(153, 153, 153); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">*/</span></code></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">public</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">synchronized</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">int</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">getVal2</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">{</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">return</span> <span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">val2</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">}</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">public</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">synchronized</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">int</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">setVal2</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">int</span> <span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">val</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">{</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">this</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">val2</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(103, 205, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">=</span> <span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">val</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">}</span></div></div></div><blockquote style="box-sizing: border-box; padding: 20px; background-color: rgb(250, 250, 250); border-left: 6px solid rgb(230, 230, 230); word-break: break-word; font-size: 16px; margin: 0px 0px 20px;"><h6 style="box-sizing: border-box; margin-top: 0px; text-rendering: optimizeLegibility; font-size: 16px; margin-bottom: 0px;"><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 600; line-height: 30px;">使用关键字AtomicXXXXX</span></h6></blockquote><div style="box-sizing:border-box;position:relative;overflow:hidden;"><div style="box-sizing: border-box; text-align: left; word-spacing: normal; tab-size: 4; hyphens: none; margin: 0px 0px 20px; overflow-y: auto; overflow-x: scroll; overscroll-behavior-x: contain; border-radius: 4px; z-index: 0; font-size: 12px; overflow-wrap: normal; word-break: break-all; white-space: pre; padding: 1em 1em 1em 3.8em; position: relative; background: rgb(45, 45, 45);"><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(248, 197, 85); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">AtomicInteger</span> <span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">mAtomicValue</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(103, 205, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">=</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">new</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(248, 197, 85); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">AtomicInteger</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">0</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">public</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">void</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">setAtomicValue</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">int</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">value</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">{</span></div><div><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">mAtomicValue</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">getAndSet</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">value</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">}</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">public</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">int</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">getAtomicValue</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">{</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">return</span> <span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">mAtomicValue</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">get</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">}</span></div></div></div><blockquote style="box-sizing: border-box; padding: 20px; background-color: rgb(250, 250, 250); border-left: 6px solid rgb(230, 230, 230); word-break: break-word; font-size: 16px; margin: 0px 0px 20px;"><h6 style="box-sizing: border-box; margin-top: 0px; text-rendering: optimizeLegibility; margin-bottom: 16px; font-size: 16px;"><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 600; line-height: 30px;">(2).代码块同步</span></h6><div style="box-sizing: border-box; margin-top: 0px; word-break: break-word; margin-bottom: 20px;"><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: normal; line-height: 30px;">代码块同步分乐观锁和悲观锁来讲解</span></div><h6 style="box-sizing: border-box; margin-top: 0px; text-rendering: optimizeLegibility; font-size: 16px; margin-bottom: 0px;"><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 600; line-height: 30px;">使用悲观锁时，其他线程等待，进入睡眠，频繁切换任务，消耗cpu资源</span></h6></blockquote><div style="box-sizing:border-box;position:relative;overflow:hidden;"><div style="box-sizing: border-box; text-align: left; word-spacing: normal; tab-size: 4; hyphens: none; margin: 0px 0px 20px; overflow-y: auto; overflow-x: scroll; overscroll-behavior-x: contain; border-radius: 4px; z-index: 0; font-size: 12px; overflow-wrap: normal; word-break: break-all; white-space: pre; padding: 1em 1em 1em 3.8em; position: relative; background: rgb(45, 45, 45);"><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">synchronized</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">this</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">{</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">}</span><span style="background-color: transparent; font-size: 100%; text-align: right; letter-spacing: -1px; white-space: inherit; word-spacing: normal; color: rgb(153, 153, 153); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace;">3</span></div></div></div><blockquote style="box-sizing: border-box; padding: 20px; background-color: rgb(250, 250, 250); border-left: 6px solid rgb(230, 230, 230); word-break: break-word; font-size: 16px; margin: 0px 0px 20px;"><h6 style="box-sizing: border-box; margin-top: 0px; text-rendering: optimizeLegibility; margin-bottom: 16px; font-size: 16px;"><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 600; line-height: 30px;">使用乐观锁时，失败重试，避免任务重复切换，减少cpu消耗</span></h6></blockquote><div style="box-sizing:border-box;position:relative;overflow:hidden;"><div style="box-sizing: border-box; text-align: left; word-spacing: normal; tab-size: 4; hyphens: none; margin: 0px 0px 20px; overflow-y: auto; overflow-x: scroll; overscroll-behavior-x: contain; border-radius: 4px; z-index: 0; font-size: 12px; overflow-wrap: normal; word-break: break-all; white-space: pre; padding: 1em 1em 1em 3.8em; position: relative; background: rgb(45, 45, 45);"><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(248, 197, 85); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">ReentrantLock</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">lock</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(103, 205, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">=</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">new</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(248, 197, 85); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">ReentrantLock</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">lock</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">lock</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">lock</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">unlock</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span><span style="background-color: transparent; font-size: 100%; text-align: right; letter-spacing: -1px; white-space: inherit; word-spacing: normal; color: rgb(153, 153, 153); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace;">4</span></div></div></div><blockquote style="box-sizing: border-box; padding: 20px; background-color: rgb(250, 250, 250); border-left: 6px solid rgb(230, 230, 230); word-break: break-word; font-size: 16px; margin: 0px 0px 20px;"><blockquote style="box-sizing: border-box; padding: 20px; background-color: rgb(250, 250, 250); border-left: 6px solid rgb(230, 230, 230); word-break: break-word; font-size: 16px; margin: 0px 0px 20px;"></blockquote><div style="box-sizing: border-box; margin-top: 0px; word-break: break-word; margin-bottom: 0px;"><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: normal; line-height: 30px;">Thread注意点就讲到这里，下面让我们进入今天的主题，多线程并发优化。</span></div></blockquote><h4 style="box-sizing: border-box; margin-top: 0px; text-rendering: optimizeLegibility; margin-bottom: 16px; font-size: 20px;"><span style="font-size: 20px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 600; line-height: 1.8;">二.Android Threading</span></h4><blockquote style="box-sizing: border-box; padding: 20px; background-color: rgb(250, 250, 250); border-left: 6px solid rgb(230, 230, 230); word-break: break-word; font-size: 16px; margin: 0px 0px 20px;"><div style="box-sizing: border-box; margin-top: 0px; word-break: break-word; margin-bottom: 20px;"><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: normal; line-height: 30px;">android中很多操作需要在主线程中执行，比如UI的操作，点击事件等等，但是如果主线程操作太多，占有的执行时间过长就会出现前面我们说的卡顿现象：</span></div><div style="box-sizing:border-box;margin:0px;padding-bottom:25px;text-align:center;font-size:0px;width:100%;"><div style="box-sizing:border-box;position:relative;z-index:95;background-color:transparent;transition:background-color 0.1s linear 0s;margin:0px auto;max-width:661px;max-height:368px;"><div style="box-sizing:border-box;z-index:90;padding-bottom:55.669999999999995%;"></div><div style="box-sizing:border-box;position:absolute;top:0px;left:0px;width:100%;height:100%;overflow:hidden;"><span style="font-size: 0px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: normal; line-height: 30px;"><img src="性能优化(9)-多线程并发优化_files/5748654-d4e4ae18dd8cd437.jpg" type="image/jpeg" data-filename="5748654-d4e4ae18dd8cd437.jpg" height="354" style="box-sizing:border-box;width:auto;height:auto;border:0px;vertical-align:middle;max-width:100%;transition:all 0.15s linear 0s;z-index:95;opacity:1;cursor:zoom-in;" width="636"/></span></div></div><div><span style="box-sizing: border-box; min-width: 20%; max-width: 80%; min-height: 43px; display: inline-block; padding: 10px; margin: 0px auto; border-bottom: 1px solid rgb(238, 238, 238); font-size: 13px; color: rgb(153, 153, 153); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: normal; line-height: 30px;">image1.jpg</span></div></div><div style="box-sizing: border-box; margin-top: 0px; word-break: break-word; margin-bottom: 20px;"><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: normal; line-height: 30px;">为了减轻主线程操作过多，避免出现卡顿的现象，我们把一些操作复杂的消耗时间长的任务放到线程池中去执行。下面我们就来介绍android中几种线程的类。</span></div><h6 style="box-sizing: border-box; margin-top: 0px; text-rendering: optimizeLegibility; margin-bottom: 16px; font-size: 16px;"><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 600; line-height: 30px;">1.AsyncTask</span></h6><div style="box-sizing: border-box; margin-top: 0px; word-break: break-word; margin-bottom: 20px;"><div><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: normal; line-height: 30px;">为UI线程与工作线程之间进行快速的切换提供一种简单便捷的机制。适用于当下立即需要启动，但是异步执行的生命周期短暂的使用场景。</span></div><div><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: normal; line-height: 30px;">它提供了一种简便的异步处理机制，但是它又同时引入了一些令人厌恶的麻烦。一旦对AsyncTask使用不当，很可能对程序的性能带来负面影响，同时还可能导致内存泄露。(关于内存泄漏在上面已经讲过)</span></div></div><h6 style="box-sizing: border-box; margin-top: 0px; text-rendering: optimizeLegibility; margin-bottom: 16px; font-size: 16px;"><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 600; line-height: 30px;">使用AsyncTask需要注意的问题?</span></h6><h6 style="box-sizing: border-box; margin-top: 0px; text-rendering: optimizeLegibility; font-size: 16px; margin-bottom: 0px;"><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 600; line-height: 30px;">(1).在AsyncTask中所有的任务都是被线性调度执行的，他们处在同一个任务队列当中，按顺序逐个执行。一旦有任务执行时间过长，队列中其他任务就会阻塞。</span></h6></blockquote><div style="box-sizing:border-box;width:100%;margin:0px;padding-bottom:25px;text-align:center;font-size:0px;"><div style="box-sizing:border-box;position:relative;z-index:95;background-color:transparent;transition:background-color 0.1s linear 0s;margin:0px auto;max-width:559px;max-height:233px;"><div style="box-sizing:border-box;z-index:90;padding-bottom:41.68%;"></div><div style="box-sizing:border-box;position:absolute;top:0px;left:0px;width:100%;height:100%;overflow:hidden;"><span style="font-size: 0px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.8;"><img src="性能优化(9)-多线程并发优化_files/5748654-713e085214020903.jpg" type="image/jpeg" data-filename="5748654-713e085214020903.jpg" height="233" style="box-sizing:border-box;width:auto;height:auto;border:0px;vertical-align:middle;max-width:100%;transition:all 0.15s linear 0s;z-index:95;opacity:1;cursor:zoom-in;" width="559"/></span></div></div><div><span style="box-sizing: border-box; min-width: 20%; max-width: 80%; min-height: 43px; display: inline-block; padding: 10px; margin: 0px auto; border-bottom: 1px solid rgb(238, 238, 238); font-size: 13px; color: rgb(153, 153, 153); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.8;">image3.jpg</span></div></div><blockquote style="box-sizing: border-box; padding: 20px; background-color: rgb(250, 250, 250); border-left: 6px solid rgb(230, 230, 230); word-break: break-word; font-size: 16px; margin: 0px 0px 20px;"><div style="box-sizing: border-box; margin-top: 0px; word-break: break-word; margin-bottom: 20px;"><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: normal; line-height: 30px;">对于上面的问题，我们可以使用AsyncTask.executeOnExecutor()让AsyncTask变成并发调度。</span></div><h6 style="box-sizing: border-box; margin-top: 0px; text-rendering: optimizeLegibility; margin-bottom: 16px; font-size: 16px;"><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 600; line-height: 30px;">(2).AsyncTask对正在执行的任务不具备取消的功能，所以我们要在任务代码中添加取消的逻辑（和上面Thread类似）</span></h6><h6 style="box-sizing: border-box; margin-top: 0px; text-rendering: optimizeLegibility; margin-bottom: 16px; font-size: 16px;"><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 600; line-height: 30px;">(3).AsyncTask使用不当会导致内存泄漏（可以参考内存泄漏一章）</span></h6><h6 style="box-sizing: border-box; margin-top: 0px; text-rendering: optimizeLegibility; margin-bottom: 16px; font-size: 16px;"><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 600; line-height: 30px;">2.HandlerThread</span></h6><div style="box-sizing: border-box; margin-top: 0px; word-break: break-word; margin-bottom: 20px;"><div><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: normal; line-height: 30px;">为某些回调方法或者等待某些任务的执行设置一个专属的线程，并提供线程任务的调度机制。</span></div><div><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: normal; line-height: 30px;">先来了解下Looper，Handler，MessageQueue</span></div><div><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: normal; line-height: 30px;">Looper: 能够确保线程持续存活并且可以不断的从任务队列中获取任务并进行执行。</span></div><div><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: normal; line-height: 30px;">Handler: 能够帮助实现队列任务的管理，不仅仅能够把任务插入到队列的头部，尾部，还可以按照一定的时间延迟来确保任务从队列中能够来得及被取消掉。</span></div><div><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: normal; line-height: 30px;">MessageQueue: 使用Intent，Message，Runnable作为任务的载体在不同的线程之间进行传递。</span></div><div><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: normal; line-height: 30px;">把上面三个组件打包到一起进行协作，这就是HandlerThread</span></div></div><div style="box-sizing:border-box;margin:0px;padding-bottom:25px;text-align:center;font-size:0px;width:100%;"><div style="box-sizing:border-box;position:relative;z-index:95;background-color:transparent;transition:background-color 0.1s linear 0s;margin:0px auto;max-width:622px;max-height:374px;"><div style="box-sizing:border-box;z-index:90;padding-bottom:60.129999999999995%;"></div><div style="box-sizing:border-box;position:absolute;top:0px;left:0px;width:100%;height:100%;overflow:hidden;"><span style="font-size: 0px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: normal; line-height: 30px;"><img src="性能优化(9)-多线程并发优化_files/5748654-e88d1a439d37bf38.jpg" type="image/jpeg" data-filename="5748654-e88d1a439d37bf38.jpg" height="374" style="box-sizing:border-box;width:auto;height:auto;border:0px;vertical-align:middle;max-width:100%;transition:all 0.15s linear 0s;z-index:95;opacity:1;cursor:zoom-in;" width="622"/></span></div></div><div><span style="box-sizing: border-box; min-width: 20%; max-width: 80%; min-height: 43px; display: inline-block; padding: 10px; margin: 0px auto; border-bottom: 1px solid rgb(238, 238, 238); font-size: 13px; color: rgb(153, 153, 153); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: normal; line-height: 30px;">image2.jpg</span></div></div></blockquote><blockquote style="box-sizing: border-box; padding: 20px; background-color: rgb(250, 250, 250); border-left: 6px solid rgb(230, 230, 230); word-break: break-word; font-size: 16px; margin: 0px 0px 20px;"><div style="box-sizing: border-box; margin-top: 0px; word-break: break-word; margin-bottom: 0px;"><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: normal; line-height: 30px;">我们先来看下源码：</span></div></blockquote><div style="box-sizing:border-box;position:relative;overflow:hidden;"><div style="box-sizing: border-box; text-align: left; word-spacing: normal; tab-size: 4; hyphens: none; margin: 0px 0px 20px; overflow-y: auto; overflow-x: scroll; overscroll-behavior-x: contain; border-radius: 4px; z-index: 0; font-size: 12px; overflow-wrap: normal; word-break: break-all; white-space: pre; padding: 1em 1em 1em 3.8em; position: relative; background: rgb(45, 45, 45);"><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">public</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">class</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(248, 197, 85); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">HandlerThread</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">extends</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(248, 197, 85); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">Thread</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">{</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">public</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(248, 197, 85); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">HandlerThread</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(248, 197, 85); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">String</span> <span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">name</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">,</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">int</span> <span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">priority</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">{</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">super</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">name</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span></div><div><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">mPriority</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(103, 205, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">=</span> <span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">priority</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">}</span></div><div><br/></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">@Override</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">public</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">void</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">run</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">{</span></div><div><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">mTid</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(103, 205, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">=</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(248, 197, 85); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">Process</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">myTid</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(248, 197, 85); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">Looper</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">prepare</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">synchronized</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">this</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">{</span></div><div><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">mLooper</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(103, 205, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">=</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(248, 197, 85); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">Looper</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">myLooper</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">notifyAll</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">}</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(248, 197, 85); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">Process</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">setThreadPriority</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">mPriority</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">onLooperPrepared</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(248, 197, 85); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">Looper</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">loop</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span></div><div><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">mTid</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(103, 205, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">=</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(103, 205, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">-</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">1</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">}</span></div><div><br/></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">public</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(248, 197, 85); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">Looper</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">getLooper</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">{</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">if</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(103, 205, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">!</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">isAlive</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">{</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">return</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">null</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">}</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(153, 153, 153); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">// If the thread has been started, wait until the looper has been created.</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">synchronized</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">this</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">{</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">while</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">isAlive</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(103, 205, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">&amp;&amp;</span> <span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">mLooper</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(103, 205, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">==</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">null</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">{</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">try</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">{</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">wait</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">}</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">catch</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(248, 197, 85); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">InterruptedException</span> <span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">e</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">{</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">}</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">}</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">}</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">return</span> <span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">mLooper</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">}</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">}</span></div></div></div><blockquote style="box-sizing: border-box; padding: 20px; background-color: rgb(250, 250, 250); border-left: 6px solid rgb(230, 230, 230); word-break: break-word; font-size: 16px; margin: 0px 0px 20px;"><h6 style="box-sizing: border-box; margin-top: 0px; text-rendering: optimizeLegibility; font-size: 16px; margin-bottom: 0px;"><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 600; line-height: 30px;">从上面的源码发现，HandlerThread其实就是在线程中维持一个消息循环队列。下面我们看下使用：</span></h6></blockquote><div style="box-sizing:border-box;position:relative;overflow:hidden;"><div style="box-sizing: border-box; text-align: left; word-spacing: normal; tab-size: 4; hyphens: none; margin: 0px 0px 20px; overflow-y: auto; overflow-x: scroll; overscroll-behavior-x: contain; border-radius: 4px; z-index: 0; font-size: 12px; overflow-wrap: normal; word-break: break-all; white-space: pre; padding: 1em 1em 1em 3.8em; position: relative; background: rgb(45, 45, 45);"><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(248, 197, 85); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">HandlerThread</span> <span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">mHanderThread</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(103, 205, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">=</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">new</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(248, 197, 85); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">HandlerThread</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(126, 198, 153); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">&quot;hanlderThreadTest&quot;</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">,</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(248, 197, 85); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">Process</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">THREAD_PRIORITY_BACKGROUND</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span></div><div><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">mHanderThread</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">run</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(248, 197, 85); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">Looper</span> <span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">mHanderThreadLooper</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(103, 205, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">=</span> <span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">mHanderThread</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">getLooper</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span></div><div><br/></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(248, 197, 85); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">Handler</span> <span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">mHandler</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(103, 205, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">=</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">new</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(248, 197, 85); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">Handler</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">mHanderThreadLooper</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">{</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">@Override</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">public</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">void</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">handleMessage</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(248, 197, 85); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">Message</span> <span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">msg</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">{</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">super</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">handleMessage</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">msg</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(153, 153, 153); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">//子线程中执行</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">}</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">}</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(153, 153, 153); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">//发送消息</span></div><div><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">mHandler</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">post</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">new</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(248, 197, 85); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">Runnable</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">{</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">@Override</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">public</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">void</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">run</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">{</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">}</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">}</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span></div></div></div><blockquote style="box-sizing: border-box; padding: 20px; background-color: rgb(250, 250, 250); border-left: 6px solid rgb(230, 230, 230); word-break: break-word; font-size: 16px; margin: 0px 0px 20px;"><h6 style="box-sizing: border-box; margin-top: 0px; text-rendering: optimizeLegibility; margin-bottom: 16px; font-size: 16px;"><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 600; line-height: 30px;">3.IntentService</span></h6><div style="box-sizing: border-box; margin-top: 0px; word-break: break-word; margin-bottom: 20px;"><div><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: normal; line-height: 30px;">适合于执行由UI触发的后台Service任务，并可以把后台任务执行的情况通过一定的机制反馈给UI。</span></div><div><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: normal; line-height: 30px;">默认的Service是执行在主线程的，可是通常情况下，这很容易影响到程序的绘制性能(抢占了主线程的资源)。除了前面介绍过的AsyncTask与HandlerThread，我们还可以选择使用IntentService来实现异步操作。IntentService继承自普通Service同时又在内部创建了一个HandlerThread，在onHandlerIntent()的回调里面处理扔到IntentService的任务。所以IntentService就不仅仅具备了异步线程的特性，还同时保留了Service不受主页面生命周期影响的特点。</span></div></div><div style="box-sizing:border-box;margin:0px;padding-bottom:25px;text-align:center;font-size:0px;width:100%;"><div style="box-sizing:border-box;position:relative;z-index:95;background-color:transparent;transition:background-color 0.1s linear 0s;margin:0px auto;max-width:700px;max-height:300px;"><div style="box-sizing:border-box;z-index:90;padding-bottom:40.32%;"></div><div style="box-sizing:border-box;position:absolute;top:0px;left:0px;width:100%;height:100%;overflow:hidden;"><span style="font-size: 0px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: normal; line-height: 30px;"><img src="性能优化(9)-多线程并发优化_files/5748654-b85e16cfc4e1ebf4.jpg" type="image/jpeg" data-filename="5748654-b85e16cfc4e1ebf4.jpg" height="256" style="box-sizing:border-box;width:auto;height:auto;border:0px;vertical-align:middle;max-width:100%;transition:all 0.15s linear 0s;z-index:95;opacity:1;cursor:zoom-in;" width="636"/></span></div></div><div><span style="box-sizing: border-box; min-width: 20%; max-width: 80%; min-height: 43px; display: inline-block; padding: 10px; margin: 0px auto; border-bottom: 1px solid rgb(238, 238, 238); font-size: 13px; color: rgb(153, 153, 153); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: normal; line-height: 30px;">image5.jpg</span></div></div><h6 style="box-sizing: border-box; margin-top: 0px; text-rendering: optimizeLegibility; margin-bottom: 16px; font-size: 16px;"><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 600; line-height: 30px;">使用IntentService需要特别注意的点：</span></h6><h6 style="box-sizing: border-box; margin-top: 0px; text-rendering: optimizeLegibility; margin-bottom: 16px; font-size: 16px;"><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 600; line-height: 30px;">(1).因为IntentService内置的是HandlerThread作为异步线程，所以每一个交给IntentService的任务都将以队列的方式逐个被执行到，一旦队列中有某个任务执行时间过长，那么就会导致后续的任务都会被延迟处理。</span></h6><h6 style="box-sizing: border-box; margin-top: 0px; text-rendering: optimizeLegibility; margin-bottom: 16px; font-size: 16px;"><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 600; line-height: 30px;">(2).通常使用到IntentService的时候，我们会结合使用BroadcastReceiver把工作线程的任务执行结果返回给主UI线程。使用广播容易引起性能问题，我们可以使用LocalBroadcastManager来发送只在程序内部传递的广播，从而提升广播的性能。我们也可以使用runOnUiThread()快速回调到主UI线程。</span></h6><h6 style="box-sizing: border-box; margin-top: 0px; text-rendering: optimizeLegibility; margin-bottom: 16px; font-size: 16px;"><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 600; line-height: 30px;">(3).包含正在运行的IntentService的程序相比起纯粹的后台程序更不容易被系统杀死，该程序的优先级是介于前台程序与纯后台程序之间的。</span></h6><h6 style="box-sizing: border-box; margin-top: 0px; text-rendering: optimizeLegibility; margin-bottom: 16px; font-size: 16px;"><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 600; line-height: 30px;">4.Loader</span></h6><div style="box-sizing: border-box; margin-top: 0px; word-break: break-word; margin-bottom: 20px;"><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: normal; line-height: 30px;">对于3.0后ContentProvider中的耗时操作，推荐使用Loader异步加载数据机制。相对其他加载机制，Loader有那些优点呢？</span></div><ul style="box-sizing:border-box;padding-left:0px;list-style:none;word-break:break-word;margin:0px 0px 20px 20px;list-style-type:disc;margin-bottom:0px;"><li style="box-sizing: border-box;"><div><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: normal; line-height: 30px;">提供异步加载数据机制</span></div></li><li style="box-sizing: border-box;"><div><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: normal; line-height: 30px;">对数据源变化进行监听，实时更新数据</span></div></li><li style="box-sizing: border-box;"><div><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: normal; line-height: 30px;">在Activity配置发生变化（如横竖屏切换）时不用重复加载数据</span></div></li><li style="box-sizing: border-box; margin-bottom: 0px;"><div><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: normal; line-height: 30px;">适用于任何Activity和Fragment</span></div><div><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: normal; line-height: 30px;">下面我们来看下Loader的具体使用：</span></div><div><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: normal; line-height: 30px;">我们以获得手机中所有的图片为例：</span></div></li></ul></blockquote><div style="box-sizing:border-box;position:relative;overflow:hidden;"><div style="box-sizing: border-box; text-align: left; word-spacing: normal; tab-size: 4; hyphens: none; margin: 0px 0px 20px; overflow-y: auto; overflow-x: scroll; overscroll-behavior-x: contain; border-radius: 4px; z-index: 0; font-size: 12px; overflow-wrap: normal; word-break: break-all; white-space: pre; padding: 1em 1em 1em 3.8em; position: relative; background: rgb(45, 45, 45);"><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">getLoaderManager</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">initLoader</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">LOADER_TYPE</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">,</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">null</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">,</span> <span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">mLoaderCallback</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span></div><div><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">LoaderManager</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">LoaderCallbacks</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(103, 205, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">&lt;</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">Cursor</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(103, 205, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">&gt;</span> <span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">mLoaderCallback</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(103, 205, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">=</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">new</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(248, 197, 85); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">LoaderManager</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="box-sizing:border-box;"><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">LoaderCallbacks</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">&lt;</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(248, 197, 85); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">Cursor</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">&gt;</span></span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">{</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">private</span> <span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">final String</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">[</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">]</span> <span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">IMAGE_COLUMNS</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(103, 205, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">=</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">{</span></div><div><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">MediaStore</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">Images</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">Media</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">DATA</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">,</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(153, 153, 153); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">//图片路径</span></div><div><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">MediaStore</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">Images</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">Media</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">DISPLAY_NAME</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">,</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(153, 153, 153); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">//显示的名字</span></div><div><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">MediaStore</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">Images</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">Media</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">DATE_ADDED</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">,</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(153, 153, 153); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">//添加时间</span></div><div><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">MediaStore</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">Images</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">Media</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">MIME_TYPE</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">,</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(153, 153, 153); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">//图片扩展类型</span></div><div><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">MediaStore</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">Images</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">Media</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">SIZE</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">,</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(153, 153, 153); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">//图片大小</span></div><div><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">MediaStore</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">Images</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">Media</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">_ID</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">,</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(153, 153, 153); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">//图片id</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">}</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span></div><div><br/></div><div><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">@</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(248, 197, 85); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">Override</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">public</span> <span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">Loader</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(103, 205, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">&lt;</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">Cursor</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(103, 205, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">&gt;</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">onCreateLoader</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">int</span> <span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">id</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">,</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(248, 197, 85); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">Bundle</span> <span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">args</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">{</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">toggleShowLoading</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">true</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">,</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">getString</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">R</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">string</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">common_loading</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span></div><div><br/></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(248, 197, 85); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">CursorLoader</span> <span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">cursorLoader</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(103, 205, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">=</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">new</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(248, 197, 85); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">CursorLoader</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">ImageSelectActivity</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">this</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">,</span> <span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">MediaStore</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">Images</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">Media</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">EXTERNAL_CONTENT_URI</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">,</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">IMAGE_COLUMNS</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">,</span></div><div><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">IMAGE_COLUMNS</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">[</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">4</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">]</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(103, 205, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">+</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(126, 198, 153); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">&quot; &gt; 0 AND &quot;</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(103, 205, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">+</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">IMAGE_COLUMNS</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">[</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">3</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">]</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(103, 205, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">+</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(126, 198, 153); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">&quot; =? OR &quot;</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(103, 205, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">+</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">IMAGE_COLUMNS</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">[</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">3</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">]</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(103, 205, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">+</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(126, 198, 153); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">&quot; =? &quot;</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">,</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">new</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(248, 197, 85); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">String</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">[</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">]</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">{</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(126, 198, 153); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">&quot;image/jpeg&quot;</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">,</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(126, 198, 153); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">&quot;image/png&quot;</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">}</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">,</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">IMAGE_COLUMNS</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">[</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">2</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">]</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(103, 205, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">+</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(126, 198, 153); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">&quot; DESC&quot;</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">return</span> <span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">cursorLoader</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">}</span></div><div><br/></div><div><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">@</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(248, 197, 85); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">Override</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">public</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">void</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">onLoadFinished</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">Loader</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(103, 205, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">&lt;</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">Cursor</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(103, 205, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">&gt;</span> <span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">loader</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">,</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(248, 197, 85); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">Cursor</span> <span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">data</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">{</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">if</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">data</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(103, 205, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">!=</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">null</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(103, 205, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">&amp;&amp;</span> <span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">data</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">getCount</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(103, 205, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">&gt;</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">0</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">{</span></div><div><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">ArrayList</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(103, 205, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">&lt;</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">String</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(103, 205, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">&gt;</span> <span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">imageList</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(103, 205, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">=</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">new</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(248, 197, 85); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">ArrayList</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(103, 205, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">&lt;</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(103, 205, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">&gt;</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span></div><div><br/></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">if</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">mShowCamera</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">{</span></div><div><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">imageList</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">add</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(126, 198, 153); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">&quot;&quot;</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">}</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">while</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">data</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">moveToNext</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">{</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(248, 197, 85); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">String</span> <span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">path</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(103, 205, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">=</span> <span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">data</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">getString</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">data</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">getColumnIndexOrThrow</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">IMAGE_COLUMNS</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">[</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">0</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">]</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span></div><div><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">imageList</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">add</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">path</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span></div><div><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">Log</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">e</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(126, 198, 153); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">&quot;ImageSelect&quot;</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">,</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(126, 198, 153); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">&quot;IIIIIIIIIIIIIIIIIIII=====&gt;&quot;</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(103, 205, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">+</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">path</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">}</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(153, 153, 153); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">//显示数据</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">showListData</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">imageList</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">toggleShowLoading</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">false</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">,</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">getString</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">R</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">string</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">common_loading</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">}</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">}</span></div><div><br/></div><div><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">@</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(248, 197, 85); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">Override</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">public</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">void</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">onLoaderReset</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">Loader</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(103, 205, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">&lt;</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">Cursor</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(103, 205, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">&gt;</span> <span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">loader</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">{</span></div><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">}</span></div></div></div><blockquote style="box-sizing: border-box; padding: 20px; background-color: rgb(250, 250, 250); border-left: 6px solid rgb(230, 230, 230); word-break: break-word; font-size: 16px; margin: 0px 0px 20px;"><div style="box-sizing: border-box; margin-top: 0px; word-break: break-word; margin-bottom: 20px;"><div><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: normal; line-height: 30px;">onCreateLoader() 实例化并返回一个新创建给定ID的Loader对象</span></div><div><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: normal; line-height: 30px;">onLoadFinished() 当创建好的Loader完成了数据的load之后回调此方法</span></div><div><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: normal; line-height: 30px;">onLoaderReset() 当创建好的Loader被reset时调用此方法，这样保证它的数据无效</span></div><div><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: normal; line-height: 30px;">LoaderManager会对查询的操作进行缓存，只要对应Cursor上的数据源没有发生变化，在配置信息发生改变的时候(例如屏幕的旋转)，Loader可以直接把缓存的数据回调到onLoadFinished()，从而避免重新查询数据。另外系统会在Loader不再需要使用到的时候(例如使用Back按钮退出当前页面)回调onLoaderReset()方法，我们可以在这里做数据的清除等等操作。</span></div></div><h6 style="box-sizing: border-box; margin-top: 0px; text-rendering: optimizeLegibility; margin-bottom: 16px; font-size: 16px;"><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 600; line-height: 30px;">5.ThreadPool</span></h6><div style="box-sizing: border-box; margin-top: 0px; word-break: break-word; margin-bottom: 20px;"><div><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: normal; line-height: 30px;">把任务分解成不同的单元，分发到各个不同的线程上，进行同时并发处理。</span></div><div><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: normal; line-height: 30px;">线程池适合用在把任务进行分解，并发进行执行的场景。</span></div><div><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: normal; line-height: 30px;">系统提供ThreadPoolExecutor帮助类来帮助我们简化实现线程池。</span></div></div><div style="box-sizing:border-box;margin:0px;padding-bottom:25px;text-align:center;font-size:0px;width:100%;"><div style="box-sizing:border-box;position:relative;z-index:95;background-color:transparent;transition:background-color 0.1s linear 0s;margin:0px auto;max-width:670px;max-height:456px;"><div style="box-sizing:border-box;z-index:90;padding-bottom:68.06%;"></div><div style="box-sizing:border-box;position:absolute;top:0px;left:0px;width:100%;height:100%;overflow:hidden;"><span style="font-size: 0px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: normal; line-height: 30px;"><img src="性能优化(9)-多线程并发优化_files/5748654-91d21d03a19a7610.jpg" type="image/jpeg" data-filename="5748654-91d21d03a19a7610.jpg" height="433" style="box-sizing:border-box;width:auto;height:auto;border:0px;vertical-align:middle;max-width:100%;transition:all 0.15s linear 0s;z-index:95;opacity:1;cursor:zoom-in;" width="636"/></span></div></div><div><span style="box-sizing: border-box; min-width: 20%; max-width: 80%; min-height: 43px; display: inline-block; padding: 10px; margin: 0px auto; border-bottom: 1px solid rgb(238, 238, 238); font-size: 13px; color: rgb(153, 153, 153); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: normal; line-height: 30px;">image4.jpg</span></div></div><div style="box-sizing: border-box; margin-top: 0px; word-break: break-word; margin-bottom: 0px;"><div><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: normal; line-height: 30px;">使用线程池需要特别注意同时并发线程数量的控制，理论上来说，我们可以设置任意你想要的并发数量，但是这样做非常的不好。因为CPU只能同时执行固定数量的线程数，一旦同时并发的线程数量超过CPU能够同时执行的阈值，CPU就需要花费精力来判断到底哪些线程的优先级比较高，需要在不同的线程之间进行调度切换。</span></div><div><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: normal; line-height: 30px;">一旦同时并发的线程数量达到一定的量级，这个时候CPU在不同线程之间进行调度的时间就可能过长，反而导致性能严重下降。另外需要关注的一点是，每开一个新的线程，都会耗费至少64K+的内存。为了能够方便的对线程数量进行控制，ThreadPoolExecutor为我们提供了初始化的并发线程数量，以及最大的并发数量进行设置。</span></div></div></blockquote><div style="box-sizing:border-box;position:relative;overflow:hidden;"><div style="box-sizing: border-box; text-align: left; word-spacing: normal; tab-size: 4; hyphens: none; margin: 0px 0px 20px; overflow-y: auto; overflow-x: scroll; overscroll-behavior-x: contain; border-radius: 4px; z-index: 0; font-size: 12px; overflow-wrap: normal; word-break: break-all; white-space: pre; padding: 1em 1em 1em 3.8em; position: relative; background: rgb(45, 45, 45);"><div><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(153, 153, 153); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">/**</span></div><div><code style="box-sizing: border-box; border: none; background: none transparent; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; font-size: 1em; padding: 0px; vertical-align: unset; position: relative; white-space: inherit;"><span style="box-sizing: border-box; background-color: transparent; color: rgb(153, 153, 153); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">* 核心线程数</span></code></div><div><code style="box-sizing: border-box; border: none; background: none transparent; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; font-size: 1em; padding: 0px; vertical-align: unset; position: relative; white-space: inherit;"><span style="box-sizing: border-box; background-color: transparent; color: rgb(153, 153, 153); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">* 最大线程数</span></code></div><div><code style="box-sizing: border-box; border: none; background: none transparent; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; font-size: 1em; padding: 0px; vertical-align: unset; position: relative; white-space: inherit;"><span style="box-sizing: border-box; background-color: transparent; color: rgb(153, 153, 153); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">* 保活时间</span></code></div><div><code style="box-sizing: border-box; border: none; background: none transparent; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; font-size: 1em; padding: 0px; vertical-align: unset; position: relative; white-space: inherit;"><span style="box-sizing: border-box; background-color: transparent; color: rgb(153, 153, 153); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">* 时间单位</span></code></div><div><code style="box-sizing: border-box; border: none; background: none transparent; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; font-size: 1em; padding: 0px; vertical-align: unset; position: relative; white-space: inherit;"><span style="box-sizing: border-box; background-color: transparent; color: rgb(153, 153, 153); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">* 任务队列</span></code></div><div><code style="box-sizing: border-box; border: none; background: none transparent; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; font-size: 1em; padding: 0px; vertical-align: unset; position: relative; white-space: inherit;"><span style="box-sizing: border-box; background-color: transparent; color: rgb(153, 153, 153); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">* 线程工厂</span></code></div><div><code style="box-sizing: border-box; border: none; background: none transparent; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; font-size: 1em; padding: 0px; vertical-align: unset; position: relative; white-space: inherit;"><span style="box-sizing: border-box; background-color: transparent; color: rgb(153, 153, 153); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">*/</span></code></div><div><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">threadPoolExecutor</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(103, 205, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">=</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 153, 205); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">new</span> <span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(248, 197, 85); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">ThreadPoolExecutor</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span></div><div><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">CORE_POOL_SIZE</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">,</span> <span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">MAXIMUM_POOL_SIZE</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">,</span> <span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">KEEP_ALIVE_SECONDS</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">,</span> <span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">TimeUnit</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">SECONDS</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">,</span></div><div><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">linkedBlockingQueue</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">,</span> <span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">sThreadFactory</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span></div><div><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">threadPoolExecutor</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">.</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(240, 141, 73); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">execute</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">(</span><span style="font-size: 1em; background: none transparent; box-sizing: border-box; border: none; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; padding: 0px; vertical-align: unset; position: relative; white-space: inherit; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">runnable</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">)</span><span style="box-sizing: border-box; background-color: transparent; font-size: 12px; color: rgb(204, 204, 204); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">;</span></div><div style="box-sizing: border-box; pointer-events: none;"><div style="padding-right: 0.8em; text-align: right;"><code style="box-sizing: border-box; border: none; background: none transparent; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; font-size: 1em; padding: 0px; vertical-align: unset; position: relative; white-space: inherit;"><span style="box-sizing:border-box;position:absolute;pointer-events:none;top:0px;font-size:100%;left:-3.8em;width:3em;letter-spacing:-1px;border-right:1px solid rgb(153, 153, 153);user-select:none;"><span style="font-size: 100%; background-color: transparent; color: rgb(153, 153, 153); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">1</span></span></code></div></div><div style="box-sizing: border-box; pointer-events: none;"><div style="padding-right: 0.8em; text-align: right;"><code style="box-sizing: border-box; border: none; background: none transparent; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; font-size: 1em; padding: 0px; vertical-align: unset; position: relative; white-space: inherit;"><span style="font-size: 100%; background-color: transparent; color: rgb(153, 153, 153); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">2</span></code></div></div><div style="box-sizing: border-box; pointer-events: none;"><div style="padding-right: 0.8em; text-align: right;"><code style="box-sizing: border-box; border: none; background: none transparent; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; font-size: 1em; padding: 0px; vertical-align: unset; position: relative; white-space: inherit;"><span style="font-size: 100%; background-color: transparent; color: rgb(153, 153, 153); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">3</span></code></div></div><div style="box-sizing: border-box; pointer-events: none;"><div style="padding-right: 0.8em; text-align: right;"><code style="box-sizing: border-box; border: none; background: none transparent; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; font-size: 1em; padding: 0px; vertical-align: unset; position: relative; white-space: inherit;"><span style="font-size: 100%; background-color: transparent; color: rgb(153, 153, 153); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">4</span></code></div></div><div style="box-sizing: border-box; pointer-events: none;"><div style="padding-right: 0.8em; text-align: right;"><code style="box-sizing: border-box; border: none; background: none transparent; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; font-size: 1em; padding: 0px; vertical-align: unset; position: relative; white-space: inherit;"><span style="font-size: 100%; background-color: transparent; color: rgb(153, 153, 153); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">5</span></code></div></div><div style="box-sizing: border-box; pointer-events: none;"><div style="padding-right: 0.8em; text-align: right;"><code style="box-sizing: border-box; border: none; background: none transparent; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; font-size: 1em; padding: 0px; vertical-align: unset; position: relative; white-space: inherit;"><span style="font-size: 100%; background-color: transparent; color: rgb(153, 153, 153); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">6</span></code></div></div><div style="box-sizing: border-box; pointer-events: none;"><div style="padding-right: 0.8em; text-align: right;"><code style="box-sizing: border-box; border: none; background: none transparent; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; font-size: 1em; padding: 0px; vertical-align: unset; position: relative; white-space: inherit;"><span style="font-size: 100%; background-color: transparent; color: rgb(153, 153, 153); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">7</span></code></div></div><div style="box-sizing: border-box; pointer-events: none;"><div style="padding-right: 0.8em; text-align: right;"><code style="box-sizing: border-box; border: none; background: none transparent; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; font-size: 1em; padding: 0px; vertical-align: unset; position: relative; white-space: inherit;"><span style="font-size: 100%; background-color: transparent; color: rgb(153, 153, 153); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">8</span></code></div></div><div style="box-sizing: border-box; pointer-events: none;"><div style="padding-right: 0.8em; text-align: right;"><code style="box-sizing: border-box; border: none; background: none transparent; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; font-size: 1em; padding: 0px; vertical-align: unset; position: relative; white-space: inherit;"><span style="font-size: 100%; background-color: transparent; color: rgb(153, 153, 153); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">9</span></code></div></div><div style="box-sizing: border-box; pointer-events: none;"><div style="padding-right: 0.8em; text-align: right;"><code style="box-sizing: border-box; border: none; background: none transparent; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; font-size: 1em; padding: 0px; vertical-align: unset; position: relative; white-space: inherit;"><span style="font-size: 100%; background-color: transparent; color: rgb(153, 153, 153); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">10</span></code></div></div><div style="box-sizing: border-box; pointer-events: none;"><div style="padding-right: 0.8em; text-align: right;"><code style="box-sizing: border-box; border: none; background: none transparent; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; font-size: 1em; padding: 0px; vertical-align: unset; position: relative; white-space: inherit;"><span style="font-size: 100%; background-color: transparent; color: rgb(153, 153, 153); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">11</span></code></div></div><div style="box-sizing: border-box; pointer-events: none;"><div style="padding-right: 0.8em; text-align: right;"><code style="box-sizing: border-box; border: none; background: none transparent; text-align: left; word-spacing: normal; word-break: normal; overflow-wrap: normal; tab-size: 4; hyphens: none; font-size: 1em; padding: 0px; vertical-align: unset; position: relative; white-space: inherit;"><span style="font-size: 100%; background-color: transparent; color: rgb(153, 153, 153); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 400; line-height: 1.5;">12</span></code></div></div></div></div><blockquote style="box-sizing: border-box; padding: 20px; background-color: rgb(250, 250, 250); border-left: 6px solid rgb(230, 230, 230); word-break: break-word; font-size: 16px; margin: 0px 0px 20px;"><h6 style="box-sizing: border-box; margin-top: 0px; text-rendering: optimizeLegibility; margin-bottom: 16px; font-size: 16px;"><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 600; line-height: 30px;">我们知道系统还提供了Executors类中几种线程池，下面我们来看下这些线程池的缺点：</span></h6><div style="box-sizing: border-box; margin-top: 0px; word-break: break-word; margin-bottom: 0px;"><div><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: normal; line-height: 30px;">newFixedThreadPool 和 newSingleThreadExecutor:主要问题是堆积的请求处理队列可能会耗费非常大的内存，甚至 OOM。</span></div><div><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: normal; line-height: 30px;">newCachedThreadPool 和 newScheduledThreadPool:主要问题是线程数最大数是 Integer.MAX_VALUE，可能会创建数量非常多的线程，甚至 OOM</span></div></div></blockquote><blockquote style="box-sizing: border-box; padding: 20px; background-color: rgb(250, 250, 250); border-left: 6px solid rgb(230, 230, 230); word-break: break-word; font-size: 16px; margin: 0px 0px 20px;"><h6 style="box-sizing: border-box; margin-top: 0px; text-rendering: optimizeLegibility; margin-bottom: 16px; font-size: 16px;"><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 600; line-height: 30px;">我们看到这些线程池但是有缺点的，所以具体使用那种方式实现要根据我们的需求来选择。</span></h6><div style="box-sizing: border-box; margin-top: 0px; word-break: break-word; margin-bottom: 0px;"><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: normal; line-height: 30px;">如果想要避开上面的问题，可以参考OKHttp中线程池的实现，OKHttp中队线程调度又封装了一层，使用安全且方便，有兴趣的可以去看看源码。</span></div></blockquote><h4 style="box-sizing: border-box; margin-top: 0px; text-rendering: optimizeLegibility; margin-bottom: 16px; font-size: 20px;"><span style="font-size: 20px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 600; line-height: 1.8;">三.线程优先级</span></h4><blockquote style="box-sizing: border-box; padding: 20px; background-color: rgb(250, 250, 250); border-left: 6px solid rgb(230, 230, 230); word-break: break-word; font-size: 16px; margin: 0px 0px 20px;"><div style="box-sizing: border-box; margin-top: 0px; word-break: break-word; margin-bottom: 20px;"><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: normal; line-height: 30px;">Android系统会根据当前运行的可见的程序和不可见的后台程序对线程进行归类，划分为forground的那部分线程会大致占用掉CPU的90%左右的时间片，background的那部分线程就总共只能分享到5%-10%左右的时间片。之所以设计成这样是因为forground的程序本身的优先级就更高，理应得到更多的执行时间。</span></div><div style="box-sizing:border-box;margin:0px;padding-bottom:25px;text-align:center;font-size:0px;width:100%;"><div style="box-sizing:border-box;position:relative;z-index:95;background-color:transparent;transition:background-color 0.1s linear 0s;margin:0px auto;max-width:574px;max-height:497px;"><div style="box-sizing:border-box;z-index:90;padding-bottom:86.59%;"></div><div style="box-sizing:border-box;position:absolute;top:0px;left:0px;width:100%;height:100%;overflow:hidden;"><span style="font-size: 0px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: normal; line-height: 30px;"><img src="性能优化(9)-多线程并发优化_files/5748654-fedda45234d2551d.jpg" type="image/jpeg" data-filename="5748654-fedda45234d2551d.jpg" height="497" style="box-sizing:border-box;width:auto;height:auto;border:0px;vertical-align:middle;max-width:100%;transition:all 0.15s linear 0s;z-index:95;opacity:1;cursor:zoom-in;" width="574"/></span></div></div><div><span style="box-sizing: border-box; min-width: 20%; max-width: 80%; min-height: 43px; display: inline-block; padding: 10px; margin: 0px auto; border-bottom: 1px solid rgb(238, 238, 238); font-size: 13px; color: rgb(153, 153, 153); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: normal; line-height: 30px;">image6.jpg</span></div></div></blockquote><blockquote style="box-sizing: border-box; padding: 20px; background-color: rgb(250, 250, 250); border-left: 6px solid rgb(230, 230, 230); word-break: break-word; font-size: 16px; margin: 0px 0px 20px;"><div style="box-sizing: border-box; margin-top: 0px; word-break: break-word; margin-bottom: 0px;"><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: normal; line-height: 30px;">默认情况下，新创建的线程的优先级默认和创建它的母线程保持一致。如果主UI线程创建出了几十个工作线程，这些工作线程的优先级就默认和主线程保持一致了，为了不让新创建的工作线程和主线程抢占CPU资源，需要把这些线程的优先级进行降低处理，这样才能给帮组CPU识别主次，提高主线程所能得到的系统资源。</span></div></blockquote><blockquote style="box-sizing: border-box; padding: 20px; background-color: rgb(250, 250, 250); border-left: 6px solid rgb(230, 230, 230); word-break: break-word; font-size: 16px; margin: 0px 0px 20px;"><div style="box-sizing: border-box; margin-top: 0px; word-break: break-word; margin-bottom: 20px;"><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: normal; line-height: 30px;">在Android系统里面，我们可以通过android.os.Process.setThreadPriority(int)设置线程的优先级，参数范围从-20到24，数值越小优先级越高。Android系统还为我们提供了以下的一些预设值，我们可以通过给不同的工作线程设置不同数值的优先级来达到更细粒度的控制。</span></div><div style="box-sizing:border-box;margin:0px;padding-bottom:25px;text-align:center;font-size:0px;width:100%;"><div style="box-sizing:border-box;position:relative;z-index:95;background-color:rgb(230, 230, 230);transition:background-color 0.1s linear 0s;margin:0px auto;max-width:525px;max-height:571px;"><div style="box-sizing:border-box;z-index:90;padding-bottom:108.75999999999999%;"></div><div style="box-sizing:border-box;position:absolute;top:0px;left:0px;width:100%;height:100%;overflow:hidden;"><span style="font-size: 0px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: normal; line-height: 30px;"><img src="性能优化(9)-多线程并发优化_files/5748654-1f22773258ff2ed1.jpg" type="image/jpeg" data-filename="5748654-1f22773258ff2ed1.jpg" height="571" style="box-sizing:border-box;width:auto;height:auto;border:0px;vertical-align:middle;max-width:100%;transition:all 0.15s linear 0s;z-index:95;opacity:0.3;cursor:zoom-in;" width="525"/></span></div></div><div><span style="box-sizing: border-box; min-width: 20%; max-width: 80%; min-height: 43px; display: inline-block; padding: 10px; margin: 0px auto; border-bottom: 1px solid rgb(238, 238, 238); font-size: 13px; color: rgb(153, 153, 153); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: normal; line-height: 30px;">image7.jpg</span></div></div></blockquote><blockquote style="box-sizing: border-box; padding: 20px; background-color: rgb(250, 250, 250); border-left: 6px solid rgb(230, 230, 230); word-break: break-word; font-size: 16px; margin: 0px 0px 20px;"><h6 style="box-sizing: border-box; margin-top: 0px; text-rendering: optimizeLegibility; font-size: 16px; margin-bottom: 0px;"><span style="font-size: 16px; color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-feature-settings: 'tnum' 1; font-variant: tabular-nums; font-weight: 600; line-height: 30px;">大多数情况下，新创建的线程优先级会被设置为默认的0，主线程设置为0的时候，新创建的线程还可以利用THREAD_PRIORITY_LESS_FAVORABLE或者THREAD_PRIORITY_MORE_FAVORABLE来控制线程的优先级。</span></h6></blockquote></div></div></div></div></div></div></div></div></div><div><br/></div></span>
</div></body></html> 